
class ProcessHID:
    def run(self):
        self._register_global_variable()
        self.run_pyqt5()

    def run_pyqt5(self, callback_mwnd=None):
        from PyQt5.QtWidgets import QApplication

        app = QApplication([])

        if callback_mwnd is None:
            from .view.mainwnd import MainWnd
            mwnd = MainWnd()
        else:
            mwnd = callback_mwnd()

        mwnd.show()
        app.exec_()

    def _register_global_variable(self):
        pass


#####################################################################

import argparse
import sys
import os.path


if __name__ == '__main__':
    # # 当使用Python-embed-runtime时，需要手动加载cwd至sys.path
    # curr_dir = os.path.abspath(".")  # os.path.curdir
    # if curr_dir not in sys.path:
    #     print(f"expy: 动态加载Lib目录【{curr_dir}】")
    #     sys.path.append(curr_dir)

    core = ProcessHID()
    core.run()
